package com.loong.global.enums.mq;

import com.loong.global.constant.MQConstant;
import lombok.Getter;

@Getter
public enum QueueEnums {
    /**
     * 会员信息上报
     */
    MEMBER_REPORT(MQConstant.EXCHANGE.USER, MQConstant.ROUTE_KEY.MEMBER,MQConstant.QUEUE_NAME.MEMBER),
    /**
     * 商家信息上报
     */
    SHOP_REPORT(MQConstant.EXCHANGE.SHOP, MQConstant.ROUTE_KEY.SHOP,MQConstant.QUEUE_NAME.SHOP),
    /**
     * 商品信息上报
     */
    GOODS_REPORT(MQConstant.EXCHANGE.GOODS, MQConstant.ROUTE_KEY.GOODS,MQConstant.QUEUE_NAME.GOODS),
    /**
     * 商品Sku上报
     */
    GOODS_SKU_REPORT(MQConstant.EXCHANGE.GOODS_SKU, MQConstant.ROUTE_KEY.GOODS_SKU,MQConstant.QUEUE_NAME.GOODS_SKU),
    /**
     * 商品Sku上报
     */
    GOODS_BRAND_REPORT(MQConstant.EXCHANGE.GOODS_BRAND, MQConstant.ROUTE_KEY.GOODS_BRAND,MQConstant.QUEUE_NAME.GOODS_BRAND),
    /**
     * 商品类型上报
     */
    GOODS_CATEGORY_REPORT(MQConstant.EXCHANGE.GOODS_CATEGORY, MQConstant.ROUTE_KEY.GOODS_CATEGORY,MQConstant.QUEUE_NAME.GOODS_CATEGORY),
    /**
     * 商品规格上报
     */
    GOODS_SPECIFICATION(MQConstant.EXCHANGE.GOODS_SPECIFICATION, MQConstant.ROUTE_KEY.GOODS_SPECIFICATION,MQConstant.QUEUE_NAME.GOODS_SPECIFICATION),

    /**
     * 手机充值
     */
    PHONE_CHARGE(MQConstant.EXCHANGE.PHONE_CHARGE,MQConstant.ROUTE_KEY.PHONE_CHARGE,MQConstant.QUEUE_NAME.PHONE_CHARGE),

    ORDER_ES(MQConstant.EXCHANGE.ORDER,MQConstant.ROUTE_KEY.ORDER,MQConstant.QUEUE_NAME.ORDER_ES),

    ORDER_DB(MQConstant.EXCHANGE.ORDER,MQConstant.ROUTE_KEY.ORDER,MQConstant.QUEUE_NAME.ORDER_DB),

    DEAD_ORDER_DB(MQConstant.EXCHANGE.ORDER,MQConstant.ROUTE_KEY.DEAD_ORDER,MQConstant.QUEUE_NAME.DEAD_ORDER_DB),

//    DEAD_ORDER_ES(MQConstant.EXCHANGE.ORDER,MQConstant.ROUTE_KEY.DEAD_ORDER,MQConstant.QUEUE_NAME.DEAD_ORDER_ES),
    ;

    QueueEnums(String exchange, String routerKey, String queueName, String delayQueueName, String delayRouteKey) {
        this.queueName = queueName;
        this.exchange = exchange;
        this.routerKey = routerKey;
        this.delayQueueName = delayQueueName;
        this.delayRouteKey = delayRouteKey;
        this.delay = true;
    }

    QueueEnums(String exchange, String routerKey, String queueName) {
        this.queueName = queueName;
        this.exchange = exchange;
        this.routerKey = routerKey;
        this.delay = false;
    }


    /**
     * 是否延时
     */
    private boolean delay;
    /**
     * 队列名字
     */
    private String queueName;
    /**
     * 交换机
     */
    private String exchange;
    /**
     * 路由
     */
    private String routerKey;
    /**
     * 延时队列
     */
    private String delayQueueName;
    /**
     * 延时路由
     */
    private String delayRouteKey;



}
